<include file="Public/header" title="{$siteSetting['site_seo_title']}" keywords="{$siteSetting['site_seo_keywords']}" description="{$siteSetting['site_seo_description']}" />

<!-- bootstrap-star-rating
<link rel="stylesheet" href="__TMPL__Public/assets/plugins/bootstrap-star-rating/css/star-rating.min.css" />
<script src="__TMPL__Public/assets/plugins/bootstrap-star-rating/js/star-rating.min.js"></script> -->
<style>

</style>
	
	<!-- MAIN -->
    <main class="x-content x-m-b-50">
		<section class="x-box with-border x-m-b-10 post regfill">			
			<div class="x-box-header post-header with-border">
				<h3>{$book.name}</h3>
			</div>
			<div class="x-box-body post-body">
				<h3 class="x-title with-tick-blue with-tick-inner">活动信息</h3>
				<ul class="x-row code-list">
					<content id="vo" table-name="code" where="tid=$tid" order="id desc">
					<li class="x-col-12-12">
						<input type="radio" class="x-check-input" id="code-item-{$vo.id}" name="code-item" value="{$vo.id}" <if condition="$vo['id'] eq $codeId">checked</if>/>
						<label for="code-item-{$vo.id}" class="x-row code-item">
							<span class="x-col-2-12 item-icon">
								<i class="ion-ios-circle-filled"></i>
							</span>
							<span class="x-col-10-12 x-p-10">
								<span class="x-row">
									<span class="x-col-8-12"><h3>{$vo.name}</h3></span>
									<span class="x-col-4-12"><span class="text-orange x-pull-right" style="font-size:0.2rem;">¥{$vo.price}</span></span>
									<p class="x-col-12-12">时间：<span class="text-default">{$vo.start_datetime}</span> 至 <span class="text-default">{$vo.end_datetime}</span></p>
								</span>
							</span>
						</label>
					</li>
					</content>
				</ul>
				<section class="x-box x-m-b-10">
					<div class="x-box-header with-border">
						<h3 class="x-title with-tick-blue with-tick-inner">参与人信息</h3>
					</div>
					<div class="x-box-body">
						<ul class="x-row" id="contact-list">
							<li class="x-col-12-12 with-border">
								<div class="x-row">
									<span class="x-col-2-12 x-p-10 btn-contact-item-check">
										<input type="checkbox" class="x-check-input" id="contact-item-001" />
										<label for="contact-item-001" class="contact-item"><i class="ion-ios-checkmark"></i></label>
									</span>
									<span class="x-col-3-12 x-label-value">看看</span>
									<span class="x-col-1-12 x-label-value">男</span>
									<span class="x-col-4-12 x-label-value">1999-09-23</span>
									<span class="x-col-2-12 x-p-10 btn-contact-item-delete"><i class="ion-ios-trash-outline"></i></span>
								</div>
							</li>
							<li class="x-col-12-12 with-border">
								<div class="x-row">
									<span class="x-col-2-12 x-p-10 btn-contact-item-check">
										<input type="checkbox" class="x-check-input" id="contact-item-002" />
										<label for="contact-item-002" class="contact-item"><i class="ion-ios-checkmark"></i></label>
									</span>
									<span class="x-col-3-12 x-label-value">看看</span>
									<span class="x-col-1-12 x-label-value">男</span>
									<span class="x-col-4-12 x-label-value">1999-09-23</span>
									<span class="x-col-2-12 x-p-10 btn-contact-item-delete"><i class="ion-ios-trash-outline"></i></span>
								</div>
							</li>
						</ul>
					</div>
					<div class="x-box-footer with-border x-p-15">
						<a href="javascript:;" class="button button-block button-rounded button-primary button-small" onclick="addContact();">添加参与人</a>
					</div>
				</section>
				
				<h3 class="x-title with-tick-blue with-tick-inner">联系人信息</h3>
				<div class="x-row">
					<input type="text" class="x-col-4-12 x-input-value" name="name" id="name" placeholder="姓名" value="{$customer.real_name}" />
					<input type="text" class="x-col-8-12 x-input-value" name="tel" id="tel" placeholder="电话" value="{$customer.tel}" />
				</div>
			</div>
		</section>
    </main>
    <!-- /MAIN -->
    
	<!-- FOOTER -->
    <footer class="x-footer">
		<ul class="x-row x-footer-bar with-border-top">
			<li class="x-col-6-12">
				<button class="button button-block button-default button-large" id="btn-buy" onclick="javascript:history.go(-1);return false;">返回</button>
			</li>
			<li class="x-col-6-12">
				<button class="button button-block button-caution button-large" id="btn-buy" onclick="javascript:confirm();return false;">确认</button>
			</li>
		</ul>
	</footer>
	<!-- /FOOTER -->

<script type="text/javascript">
(function() {
})();

function addContact() {
	var newContactDom = '\
		<form id="form1" novalidate="novalidate">\
		<ul class="x-row">\
			<li class="x-col-12-12 with-border">\
				<div class="x-row">\
					<label for="realName" class="x-col-3-12 x-label-name">姓名</label>\
					<input type="text" class="x-col-9-12 x-input-value" name="realName" id="realName" placeholder="姓名">\
				</div>\
			</li>\
			<li class="x-col-12-12 with-border">\
				<div class="x-row">\
					<label for="sex" class="x-col-3-12 x-label-name">性别</label>\
					<input type="text" class="x-col-9-12 x-input-value" name="sex" id="sex" placeholder="性别">\
				</div>\
			</li>\
			<li class="x-col-12-12 with-border">\
				<div class="x-row">\
					<label for="birthday" class="x-col-3-12 x-label-name">生日</label>\
					<input type="text" class="x-col-9-12 x-input-value" name="birthday" id="birthday" placeholder="生日" readonly="">\
				</div>\
			</li>\
		</ul>\
		</form>\
	';
   	xpop({
       	title: '添加参与人',
        msg: '',
        content: newContactDom,
        buttons: [{
            text: '取消',
            'class': 'weui_btn_dialog default',
            handler: function ($this) {
        		$this.destroy();
            }
        }, {
            text: '确定',
            'class': 'weui_btn_dialog primary',
            handler: function ($this) {
        		console.log($('#foo').val());
        		
        		$this.destroy();									// 4 confirm, close last
            }
        }]
    });
}
</script>
